package utils;

import java.io.File;
import java.util.List;

import data.TestUserSelection;

public class DeleteFile {

	public DeleteFile() {

	}

	public void delete(String path) throws Exception {
		File dir = new File(path);
		File[] list = dir.listFiles();
		for (File f : list)
			f.delete();
        dir.delete();
	}

	public static void main(String[] args) throws Exception {
		DeleteFile app = new DeleteFile();
		List<String> users = TestUserSelection.retrieveTestUsers();
		for (String user : users) {
			String path = "D:\\CityU\\project\\bibsonomy\\experiment\\" + user
					+ "\\result\\hybrid_title_author_bayesian\\";
			
			app.delete(path);
			
		}

	}

}
